import { HTTP } from "../utils/http.js";

export class Address extends HTTP {
    getAddress() {
        return this.request({
            url: 'user/address'
        })
    }
    getUserAddress(id) {
        return this.request({
            url: `user/address/${id}`,
        })
    }

    addAaddress(address) {
        return this.request({
            url: 'user/address',
            method: 'POST',
            data: { ...address }
        })
    }

    delAddress(id) {
        return this.request({
            url: 'user/del_address',
            method: 'POST',
            data: { id }
        })
    }
}